<?php
class RegistrationController extends Zend_Controller_Action
{
    public function indexAction()
    {
        $form = new RegistrationForm();
        if ($this->getRequest()->isPost()) {
        	if ($form->isValid($_POST)) {
        		$usersModel = new Users();
        		$usersModel->createUser($form->getValue('email'), $form->getValue('password'));
        		die('user created');
        	}
        }
        $this->view->form = $form;
    }
}
